//
//  UILabel+YsToolsManager.m
//  YsToolsManager
//
//  Created by 宋宏康 on 2020/3/20.
//

#import "UILabel+YsToolsManager.h"
#import <YYCategories/YYCategories.h>

@implementation UILabel (YsToolsManager)
+ (instancetype)creatLabel:(NSString *__nullable)title
                 textColor:(UIColor *)color
                  fontSize:(UIFont *)font
             numberofLines:(NSInteger)numberofLines
{
    UILabel *label = [[self alloc] init];
    label.text = title;
    label.textColor = color;
    label.font = font;
    label.numberOfLines = numberofLines;
    return label;
}

+ (instancetype)creatLabel:(NSString *__nullable)title
                 textColor:(UIColor *)color
                  fontSize:(UIFont *)font
             numberofLines:(NSInteger)numberofLines
             textAlignment:(NSTextAlignment)textAlignment
{
    UILabel *label =   [self creatLabel:title textColor:color fontSize:font numberofLines:numberofLines];
    label.textAlignment = textAlignment;
    return label;
}

+ (instancetype)creatLabel:(NSString *__nullable)title
                 textColor:(UIColor *)color
                  fontSize:(UIFont *)font
             numberofLines:(NSInteger)numberofLines
             textAlignment:(NSTextAlignment)textAlignment
           backgroundColor:(UIColor *)backgroundColor
{
    UILabel *label =   [self creatLabel:title textColor:color fontSize:font numberofLines:numberofLines];
    label.textAlignment = textAlignment;
    label.backgroundColor = backgroundColor;
    return label;
}
@end
